package com.star.percalservice.controller;

import com.star.percalservice.service.HomeDataService;
import com.star.percalservice.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author star
 * @version 1.0
 * @Description:
 * @DateTime 2025/4/12 5:23
 */

@RestController
@RequestMapping("/api/home")
public class HomeDataController {

    @Autowired
    private HomeDataService homeDataService;


    @GetMapping("/data")
    public R getHomeData() {
        return homeDataService.getHomeData();
    }

    @GetMapping("/teacher-data")
    public R getTeacherData(@RequestParam("tid") Integer tid) {
        return homeDataService.getTeacherData(tid);
    }

}
